package com.ziwei.material.util;

import org.springframework.util.DigestUtils;

import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

public class StringUtil {
    public static String getMd5(String md5Str) {
        return DigestUtils.md5DigestAsHex(md5Str.getBytes(StandardCharsets.UTF_8));
    }

    public static void main(String[] args) {
        String dateString = "2024-11-01 00:00:00";
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = null;
        try {
            date = formatter.parse(dateString);
        } catch (ParseException e) {
            return ;
        }
        long timestamp = date.getTime();
        System.out.println(timestamp);
        if(System.currentTimeMillis() > timestamp){
            //2024年11月后钉钉可以用，直接屏蔽即可
            System.out.println("return");
        }
        System.out.println("execute");



    }
}
